<template>
    <div class='top-background'>
        <img :src="topBg" alt=""/>
    </div>
</template>

<script>
import {mapGetters} from "vuex"
export default {
    name: '',
    data() { 
        return {
        }
    },
    computed:{
        ...mapGetters(['themeClass']),
        topBg(){
            let image = require('@/style/theme/images/topBg-default.png');
            //根据不同的主题，切换不同的顶部背景图片
            if(this.themeClass != 'theme-DEFAULT'){
                image = require('@/style/theme/images/topBg-default.png');
            }
            return image
        }
    },
    props: {

    },
    components:{
    },
    mounted() {

    },
    methods:{

    },
}
</script>

<style lang='scss' scoped>
.top-background{
    position:fixed;
    width:100%;
    left:0;
    top:0;
    z-index: 1;
    img{
        display:block;
        width:100%;
        height:auto;
    }
}
</style>